package li.buda.blueprint.blazeds.client.facade {
import li.buda.config.RemoteObjectFactory;

import mx.controls.Alert;
import mx.rpc.events.FaultEvent;
import mx.rpc.events.ResultEvent;
import mx.rpc.remoting.RemoteObject;

public class RemoteServiceFacade {
    //    private var ro:RemoteObject;
    private var invoker:RemoteInvoker;

    public function RemoteServiceFacade() {
        var ro:RemoteObject = RemoteObjectFactory.create();
        ro.destination = "remoteService"
        invoker = new RemoteInvoker(ro);
    }

    public function sayHello(who:String, onResult:Function = null, onFault:Function = null):void {
        invoker.invoke("sayHello", [who], onResult, onFault);
    }

    public function raiseException(raise:Boolean, onResult:Function = null, onFault:Function = null):void {
        invoker.invoke("raiseException", [raise], onResult, onFault);
    }

    public function getPerson(onResult:Function = null, onFault:Function = null):void {
        invoker.invoke("getPerson", [], onResult, onFault);
    }

}
}